﻿using System.Collections.Generic;
using umbraco.BusinessLogic;
using umbraco.cms.businesslogic.media;

namespace uREST.CMS.MediaFactories
{
    public interface IMediaFactory
    {
        List<string> Extensions { get; }
        int Priority { get; }

        string ConstructDestPath(int propertyId);
        string ConstructDestFileName(int propertyId, string filename);
    }

    public interface IMediaFactoryCreator : IMediaFactory
    {
        bool CanCreateMedia(int parentNodeId, UploadedFile uploadedFile, User user);
        Media CreateMedia(int parentNodeId, UploadedFile uploadedFile, User user);
    }

    public interface IMediaFactoryUpdater : IMediaFactory
    {
        bool CanUpdateMedia(int id, UploadedFile uploadedFile, User user);
        Media UpdateMedia(int id, UploadedFile uploadedFile, User user);
    }
}
